<template>
  <el-carousel :interval="4000" type="card" height="200px">
    <el-carousel-item v-for="(item, index) in pictureArr" :key="index">
      <el-image :src="item" :fit="fit"> </el-image>
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  name: "Lunbo",
  data() {
    return {
      pictureArr: [
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/dd741adcce9417d72ea4c1a6dfcc96e2.jpg?thumb=1&w=1533&h=575&f=webp&q=90",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/918820682e4a490221cfd92b24c14b86.jpg?thumb=1&w=1533&h=575&f=webp&q=90",
        "http://5b0988e595225.cdn.sohucs.com/images/20180819/b9666a424e334e7282e5205f496c1e5f.png",
        "https://img2.baidu.com/it/u=1141803059,2388393643&fm=253&fmt=auto&app=138&f=JPEG?w=899&h=500",
      ],
      fit: "",
    };
  },
};
</script>

<style lang="less">
.el-carousel {
  margin-top: 50px;
}
img {
  object-fit: cover;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
